{% extends "base.html" %}
{%block title %}系统设置 {% endblock %}
{%block init_menu %}setting{% endblock %}
{%block content_title %}系统设置 {% endblock %}
{% block content %}
<form method="post" action="/a/settings/" class="f">
<fieldset>
	<p>
		<input id="name" name="name" type="text" maxlength="100" value="{{settings.name}}">
		<label for="name">网站名</label>
	</p>
	
	<p>
		<select name="theme-name" id="theme-name">
	        {% for theme in themes %}
	        <option value="{{theme}}" {% ifequal theme settings.theme %} selected="selected" {% endifequal %} >{{theme}}</option>
	        {% endfor %}
	    </select>
		<label for="theme-name">模板</label>
	</p>
        <input id="image_thumb_width" name="image_thumb_width" type="text" maxlength="5" value="{{settings.image_thumb_width}}" style="width:40px;">px & <input id="image_thumb_height" name="image_thumb_height" type="text" maxlength="5" value="{{settings.image_thumb_height}}" style="width:40px;">px
        <label for="image_thumb">缩略图大小</label>
    <p>
    </p>
	
	<p>
        <input type="checkbox" name="is_check_md5" {% if settings.is_check_md5 %} checked="checked" {% endif %}>
        <label for="is_check_md5">是否过滤重复图片</label>
	</p>
	<p>
		<input type="submit" value="保存">
	</p>
</fieldset>
</form>

<h3>Twitter设置</h3>
<form method="post" action="/a/twitter/" class="f">
<fieldset>
	<p>{% if settings.twitter_user %}{{settings.twitter_user}}{% else %}还未登录，快登录吧{% endif%}</p>
    <p>
        <input type="submit" value="登录twitter">
    </p>
</fieldset>
</form>

<h3>清除缓存</h3>
<form method="post" action="/a/flush/" class="f">
<fieldset>
    <p>
        <input type="submit" value="清除缓存">
    </p>
</fieldset>
</form>

<h3>图片总数</h3>
<form method="post" action="/a/totalpic/" class="f">
当前有图片:{{settings.pic_total_number}}张。
<fieldset>
    <p>
        <input type="submit" value="统计">
    </p>
</fieldset>
</form>
{% endblock %}